import { _decorator, Component, find, instantiate, Node, Prefab, resources } from 'cc';
import Banner from './Scripts/Banner';
import PrivacyPanel from './Scripts/UI/Panel/PrivacyPanel';
const { ccclass, property } = _decorator;

@ccclass('HideButton')
export class HideButton extends Component {
    start() {

    }

    update(deltaTime: number) {

    }

    Hide() {
        // Banner.Instance.AndroidPrivacy();
        resources.load("Prefabs/UI/PrivacyPanel", Prefab, (err, res) => {
            if (err) console.log("没找到PrivacyPanel")
            let pre = instantiate(res);
            pre.setParent(find("Canvas"));
            pre.getComponent(PrivacyPanel).Show(false);
        })
    }

    Kefu() {
        Banner.Instance.AndroidKeFu();
    }

    More() {
        Banner.Instance.AndroidMoreGame();
    }
}


